/*
 * MODULE NAME:    tci_transport_impl.h
 * DESCRIPTION:    TCI Transport Driver Header for Win32 
 * AUTHOR:         jenny Murphy
 * DATE:           31 May 2001
 *
 * SOURCE CONTROL: $Id:
 *
 * LICENSE:
 *     This source code is copyright (c) 2001-2002 Parthus Technologies.
 *     All rights reserved.
 *
 */


#ifndef TCI_TRANSPORT_IMPL_H
#    define TCI_TRANSPORT_IMPL_H


#include "host_config.h"


#define WIN32_LEAN_AND_MEAN
#include "windows.h"


#define _tcs_MODULENAME _T("TCI_Transport_Win32")
#define MODULENAME "TCI_Transport_Win32"


/*
	registry handling - see platform_config.h
*/

/* Registry settings for the RS232 interface  */
#define REG_KEY_SERIAL_MODULE _T("Serial")

/* The names to be used for the registry values */
#define REG_NAME_PORT _T("Port")
#define REG_NAME_BAUDRATE _T("BaudRate")
#define REG_NAME_PARITY _T("Parity")
#define REG_NAME_DATABITS _T("DataBits")
#define REG_NAME_STOPBITS _T("StopBits")
#define REG_NAME_USERTSCTS _T("UseRtsCts")
#define SERIAL_DEFAULT_USERTSCTS _T("YES")

/* The defaults to use if there are no registry entries */
#define SERIAL_DEFAULT_PORT		_T("COM1")
#define SERIAL_DEFAULT_BAUDRATE _T("38400")
#define SERIAL_DEFAULT_PARITY	_T("NONE")
#define SERIAL_DEFAULT_STOPBITS _T("1")
#define SERIAL_DEFAULT_DATABITS _T("8")

#define REG_VALUE_MAXLEN 255

#define MAX_TCI_PDU_LEN 65536 

#if pDEBUG
#	define DEBUGBUFLEN		4096 /* used for debugging output only */
#endif

#define RS232_ERROR_MSG_LEN   4
#define RS232_NEGOT_MSG_LEN   8


/*  TCI RS232 Packet Types */
#define RS232_TCI_COMMAND 0x1
#define RS232_TCI_ACLDATA 0x2
#define RS232_TCI_SCODATA 0x3
#define RS232_TCI_EVENT   0x4
#define RS232_ERROR_MSG   0x5
#define RS232_NEGOT_MSG   0x6

/* Header Lenghts */
#define TCI_pduCOMMANDHEADER	0x03
#define TCI_pduACLDATAHEADER	0x04
#define TCI_pduSCODATAHEADER	0x03
#define TCI_pduEVENTHEADER		0x02

#endif

